package org.csy.generic.test00.demo04;

/**
 * 泛型设置边界
 * @author CSY
 * @date 2025 - 03 - 25
 */
public class People<P extends Gentle> {
    private P pet;

    public People(){}

    public People(P pet) {
        this.pet = pet;
    }

    public P getPet() {
        return pet;
    }

    public void setPet(P pet) {
        this.pet = pet;
    }

    public void shopping(){
        System.out.println("带温顺的宠物逛街");

    }
}
